// 对 ant design vue 的默认样式覆盖

// popover
.ant-popover {
  padding-top: 5px !important;
}
.ant-popover-arrow {
  display: none;
}
.ant-popover-inner {
  box-shadow: $boxShadow;
  border: 1px solid $borderColor;
}
.ant-popover-inner-content {
  padding: 12px !important;
}

// dropdown
.ant-dropdown-menu {
  min-width: 150px;
  box-shadow: $boxShadow;
  border: 1px solid $borderColor;
  margin-top: -4px;
}
.ant-dropdown-menu-item {

  &:hover {
    background-color: rgba($color: $themeColor, $alpha: .2);
  }
}

// button
.ant-btn {
  &.no-padding {
    padding: 0;
  }
}

// radio
.ant-radio-button-wrapper {
  text-align: center;
}

// slider
.ant-slider-track {
  background-color: $themeColor;
}
.ant-slider-handle {
  border-color: $themeColor;
}

// select
.ant-select {
  user-select: none;
  overflow: hidden;
}
.ant-select-item-option-active:not(.ant-select-item-option-disabled) {
  background-color: rgba($color: $themeColor, $alpha: .2);
}

// tooltip
.ant-tooltip-inner {
  font-size: 12px;
}

// input
.ant-input-number-input {
  line-height: 30px;
}

.x-flex {
  display: flex;
  flex-direction: row;
  align-items: center;
}
.x-row-between {
  justify-content: space-between;
}
.x-flex1 {
  flex: 1;
}
@for $i from 12 to 50 {
  .x-font-#{$i} {
    font-size: $i + px;
  }
}
@for $i from 0 through 80 {
  @if $i % 2 == 0 or $i % 5 == 0 {
    .x-margin-#{$i}, .x-m-#{$i} {
      margin: $i + px !important;
    }

    .x-padding-#{$i}, .x-p-#{$i} {
      padding: $i + px !important;
    }

    @each $short, $long in l left, t top, r right, b bottom {
      .x-m-#{$short}-#{$i} {
        margin-#{$long}: $i + px !important;
      }

      .x-p-#{$short}-#{$i} {
        padding-#{$long}: $i + px !important;
      }

      .x-margin-#{$long}-#{$i} {
        margin-#{$long}: $i + px !important;
      }

      .x-padding-#{$long}-#{$i} {
        padding-#{$long}: $i + px !important;
      }
    }
  }
}

.x-scroll{
&::-webkit-scrollbar-track-piece {
  background-color: inherit;
  -webkit-border-radius: 16px;
  border-radius: 10px;
}

&::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

&::-webkit-scrollbar-thumb {
  height: 50px;
  background-color: #DCE0E6;
  -webkit-border-radius: 6px;
  outline: 2px solid #fff;
  outline-offset: -2px;
  border: 2px solid #fff;
  filter: alpha(opacity=50);
  -moz-opacity: 0.5;
  -khtml-opacity: 0.5;
  opacity: 0.5;
}

&::-webkit-scrollbar-thumb:hover {
  height: 50px;
  background-color: #878987;
  -webkit-border-radius: 6px;
}
}
